//
//  JKComposeTypeButton.swift
//  新浪微博
//
//  Created by Jack.Lin on 16/7/10.
//  Copyright © 2016年 Jack.Lin. All rights reserved.
//

import UIKit

class JKComposeTypeButton: UIControl {


    @IBOutlet weak var titleLabel: UILabel!
    
    @IBOutlet weak var imageView: UIImageView!
    
    // 点击按钮要展现控制器的类型
    var clsName: String?
    
    
    class func composeTypeButton(imageaName: String, title: String) -> JKComposeTypeButton {
        
        let nib = UINib(nibName: "JKComposeTypeButton", bundle: nil)
        
        let btn = nib.instantiate(withOwner: nil, options: nil)[0] as! JKComposeTypeButton
        
        btn.imageView.image = UIImage(named: imageaName)
        btn.titleLabel.text = title
        
        return btn
    }
    
}
